<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <#include file=/public.html />
  <link rel="stylesheet" href="/assest/layui-v2.4.5/css/layui.css">
  <title>论坛</title>

</head>
<div style="padding: 20px; background-color: #F2F2F2; height: 800px;">
  <#include file="/head.html" />
  <div style="height:5px;"></div>
  <div style="float:left;width:15%;">
    <table class="" style="width:100%;">
      <#list data=group item=d>
        <tr>
          <td style="padding:4px;">
            <a href="/bbs?groupid=#{d.id}" style="width:100%;" class="layui-btn layui-btn-primary layui-btn-radius">
              #{d.text}
            </a>
          </td>
        </tr>
      </#list>
    </table>

  </div>
  <div style="float: right;width:84%;">
    <div style="text-align: right;">
      <button class="layui-btn">发帖</button>
    </div>
    <table class="layui-table" id="tb_content" style='margin-top:-8px;'>

    </table>
  </div>
</div>

<script type="text/javascript" src="/assest/layui-v2.4.5/layui.all.js"></script>
<script>
  var table;
  layui.use('table', function () {
    table = layui.table;

    table.render({
      elem: '#tb_content'
      , url: '/bbs/getcontent'
      , where: {
        groupid: "#{groupid}"
      }
      , cols: [[
        {
          title: '帖子'
          , templet: function (d) {
            return '<a class="layui-table-link" href="/bbs/content?id=' + d.id + '">' + d.title + '</a>'
          }

        }
        , { field: 'uptime', width: 200, title: '日期' }
      ]]
      , page: true
    });


  });
</script>

</html>